package com.xcesys.extras.remoting.security;

import java.util.Date;

import javax.jws.WebService;

import com.xcesys.extras.dataobject.security.Authentication;

@WebService(targetNamespace = "com.xcesys.extras.remoting.security", serviceName = "AuthenticationService")
public interface RAuthenticationService {
	public Date dummy();

	/**
	 * Changes login password.
	 * 
	 * @param username
	 *            logged in username
	 * @param oldPwd
	 *            old password.
	 * @param newPwd
	 *            new password.
	 */
	public void changePassword(String username, String oldPwd, String newPwd);

	/**
	 * <p>
	 * Log user in system with given user name, password.
	 * </p>
	 * <p>
	 * Secured token is a encrypt string value created at server side and send
	 * back to client while user log on system from remote client.
	 * </p>
	 * 
	 */
	public Authentication doAuthenticate(String username, String password);

	/**
	 * Try log user out.
	 * 
	 * @param username
	 */
	public void logout(String username);

}
